package cn.wjx.taobaounion.model;

import cn.wjx.taobaounion.model.domain.Categories;
import cn.wjx.taobaounion.model.domain.CategoryContent;
import cn.wjx.taobaounion.model.domain.OnSaleContent;
import cn.wjx.taobaounion.model.domain.SearchRecommend;
import cn.wjx.taobaounion.model.domain.SearchResult;
import cn.wjx.taobaounion.model.domain.SelectedCategories;
import cn.wjx.taobaounion.model.domain.SelectedContent;
import cn.wjx.taobaounion.model.domain.TicketParam;
import cn.wjx.taobaounion.model.domain.TicketResult;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * @author WuChangJian
 * @date 2020/6/17 10:20
 */
public interface Api {
    @GET("discovery/categories")
    Call<Categories> getCategories();

    @GET("discovery/{materialId}/{page}")
    Call<CategoryContent> getCategoryContent(@Path("materialId") int materialId, @Path("page") int page);

    @POST("tpwd")
    Call<TicketResult> getTicketResult(@Body TicketParam ticketParam);

    @GET("recommend/categories")
    Call<SelectedCategories> getSelectedCategories();

    @GET("recommend/{categoryId}")
    Call<SelectedContent> getSelectedContent(@Path("categoryId") int categoryId);

    @GET("onSell/{page}")
    Call<OnSaleContent> getOnSaleContent(@Path("page") int page);

    @GET("search/recommend")
    Call<SearchRecommend> getSearchRecommend();

    @GET("search")
    Call<SearchResult> getSearchResult(@Query("page") int page, @Query("keyword") String keyword);
}
